import { observable, action } from 'mobx';

/**
 * @author liuzy 2017-10-20
 * 流程全局store状态，存储菜单间共用的状态
*/
export class WFGlobalStore {
    @observable currentListSymbol = "";
    @observable forwardParams = {};
    @observable modifyLogParams = {};    //弹窗显示属性

    constructor() {
        this.setCurrentListSymbol = this.setCurrentListSymbol.bind(this);
        this.controllForwardModal = this.controllForwardModal.bind(this);
        this.controlModifyLogParams = this.controlModifyLogParams.bind(this);
    }

    @action
    setCurrentListSymbol(symbol) {
        this.currentListSymbol = symbol;
    }

    //控制转发
    controllForwardModal(params = {}) {
        this.forwardParams = params;
    }

    //控制表单修改日志
    controlModifyLogParams(params = {}){
        this.modifyLogParams = params;
    }
}